@namespace DevToys.Blazor.Components.UIElements
@using DevToys.Api;
@inherits ComponentBase

<StackPanel id="@UIWrap.Id"
            IsVisible="@UIWrap.IsVisible"
            IsEnabled="@UIWrap.IsEnabled"
            HorizontalAlignment="@UIWrap.HorizontalAlignment"
            VerticalAlignment="@UIWrap.VerticalAlignment"
            Orientation="UIOrientation.Horizontal"
            Wrap="true"
            Spacing="@(UIWrap.Spacing.ToPxInteger())">
    @if (UIWrap.Children is not null)
    {
        for (int i = 0; i < UIWrap.Children.Length; i++)
        {
            if (UIWrap.Children[i] is not null)
            {
                <UIElementPresenter UIElement="@UIWrap.Children[i]" />
            }
        }
    }
</StackPanel>